home *** CD-ROM | disk | FTP | other *** search
- #pragma off(Optimize_for_space);
-
- #define PI_MALLOC( size ) ((char *)pi_data->func1(size))
- #define PI_FREE( buf ) (pi_data->func2(buf))
- #define PI_FNAME (pi_data->fname)
- #define PI_COMMENT (pi_data->comment)
- #define PI_DS (pi_data->ds)
- #define PI_FORECOL (pi_data->fore_color)
- #define PI_BACKCOL (pi_data->back_color)
- #define PI_TILEFLG (pi_data->til_mode)
- #define PI_USE_TILE 1
-
- #define PI_TILE_X (pi_data->til_size.x)
- #define PI_TILE_Y (pi_data->til_size.y)
- #define PI_TILE_PAT (pi_data->tilPtn)
-
- #define PI_PAGE (pi_imge->page)
- #define PI_PIX (pi_imge->pix)
- #define PI_IMAGEBUF (pi_imge->image)
- #define PI_MASKBIT (pi_imge->edit)
- #define PI_COLMAP (pi_imge->clut)
- #define PI_SIZE (pi_imge->size)
- #define PI_SIZE_X (pi_imge->size.x)
- #define PI_SIZE_Y (pi_imge->size.y)
-
-
- const char shortname[] = "OT";
-
- PI_TYPE *pi_type;
- PI_DATA *pi_data;
- PI_IMAGE *pi_imge;
- PI_PARA *pi_para;
- FRAME *ret_fr; /* 画像転送範囲 */
- char *EgbPtr;
- char *g_para;
-
- #ifndef USE_ENV
- #define USE_ENV PI_NOSET_ENV
- #endif
-
- #ifndef USE_PEN
- #define USE_PEN PI_SYS_PEN
- #endif
-
- #ifdef USE_FILE
- #define USE_TYPE USE_FILE
- #endif
-
- int pinHead(int service, void *arg1, void *arg2, void *arg3, void *arg4)
- {
- int ret = 0;
-
- ret = 0;
- switch (service) {
- case 0: /* 正式名称 */
- strcpy((char *)arg1, longname);
- break;
- case 1: /* 省略名称 */
- strcpy((char *)arg1, shortname);
- break;
- case 2: /* 初期化 */
- pi_type = (PI_TYPE *)arg1;
- strcpy((* pi_type).name, longname); /* モジュール名 */
- (* pi_type).type = USE_TYPE; /* Type */
- (* pi_type).env1 = USE_ENV; /* 環境設定フラグ */
-
- #if USE_TYPE == PI_DRAW_STAMP
- (* pi_type).env2 = (int )&stamp; /* スタンプ:サイズ */
- #elif defined(USE_FILE)
- (* pi_type).env2 = (int )&extend; /* ファイル系:拡張子*/
- #else
- (* pi_type).env2 = USE_PEN; /* 描画系:ペン指定 */
- #endif
-
- #ifdef USE_SETUP_FUNC
- USE_SETUP_FUNC();
- #endif
- break;
- case 3: /* 実行 */
- /*--------------------------------------------------------------*/
- /* 必要なパラメタをコピーしておく */
- /*--------------------------------------------------------------*/
- pi_data = (PI_DATA *)arg1;
- pi_imge = (PI_IMAGE *)arg2;
- pi_para = (PI_PARA *)arg3;
- ret_fr = (FRAME *)arg4;
- if( (* pi_para).type != USE_TYPE ) // 形式の確認
- break;
- g_para = (* pi_para).gpara;
- EgbPtr = pi_imge->egbWork;
- /*--------------------------------------------------------------*/
- /* 実行部の呼び出し(パラメタ形式は自由) */
- /*--------------------------------------------------------------*/
- ret = APL_exec();
-
- break;
- case 4: /* 終了 */
- break ;
- case 5: /* データ */
- #if USE_ENV
- *((int *)arg1) = cnfg_max; // データ数
- *((int *)arg2) = (int)cnfg; // データアドレス
- #endif
- break;
- }
-
- return ret;
- }
- void main(){}
-
-